<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>Glossary for ArmBob 4.0</TITLE>
<LINK REL=STYLESHEET HREF="style.css" TYPE="text/css">
</HEAD>
<BODY style="margin-left: 6em;">
<H2>Glossary for ArmBob 4.0</H2>
<P>
The following words denote built in functions, values or 
operators. 
<P>
<A HREF="#pling"> <CODE>!</CODE></A> , &nbsp;
<A HREF="#notequal"> <CODE>!=</CODE></A> , &nbsp;
<A HREF="#dollar"> <CODE>&#36;</CODE></A> ,&nbsp;
<A HREF="#dollar2"> <CODE>&#36;&#36;</CODE></A>  , &nbsp;
<A HREF="#percent"> <CODE>&#37;</CODE></A> , &nbsp;
<A HREF="#percentequal"> <CODE>&#37;=</CODE></A> , &nbsp;
<A HREF="#and"> <CODE>&#38;</CODE></A> , &nbsp;
<A HREF="#and2"> <CODE>&#38;&#38;</CODE></A> , &nbsp;
<A HREF="#andequal"> <CODE>&#38;=</CODE></A> , &nbsp;
<A HREF="#and2equal"> <CODE>&#38;&#38;=</CODE></A> , &nbsp;
<A HREF="#times"> <CODE>&#42;</CODE></A> ,&nbsp;
<A HREF="#timesequal"> <CODE>&#42;=</CODE></A> ,&nbsp;
<A HREF="#plus"> <CODE>&#43;</CODE></A> ,&nbsp;
<A HREF="#plus2"> <CODE>&#43;&#43;</CODE></A> , &nbsp;
<A HREF="#plusequal"> <CODE>&#43;=</CODE></A> ,&nbsp;
<A HREF="#minus"> <CODE>&#45;</CODE></A> , &nbsp;
<A HREF="#minus2"> <CODE>&#45;&#45;</CODE></A> , &nbsp;
<A HREF="#minusequal"> <CODE>&#45;=</CODE></A> , &nbsp;
<A HREF="#arrow">-&gt;<CODE></CODE></A> , &nbsp;
<A HREF="#divide"> <CODE>&#47;</CODE></A> , &nbsp;
<A HREF="#divideequal"> <CODE>&#47;=</CODE></A> ,&nbsp;
<A HREF="#colon"><CODE>:</CODE></A> , &nbsp;
<A HREF="#colon2"><CODE>::</CODE></A> ,&nbsp;
<A HREF="#lessthan"> <CODE>&lt;</CODE></A> ,&nbsp;
<A HREF="#lessthan2"> <CODE>&lt;&lt;</CODE></A> , &nbsp;
<A HREF="#lessthanequal"> <CODE>&lt;=</CODE></A> , &nbsp;
<A HREF="#lessthan2equal"> <CODE>&lt;&lt;=</CODE></A> ,&nbsp;
<A HREF="#assign"> <CODE>=</CODE></A> ,&nbsp; 
<A HREF="#equal"> <CODE>==</CODE></A> , &nbsp;
<A HREF="#greater"> <CODE>&gt;</CODE></A> , &nbsp;
<A HREF="#greaterequal"> <CODE>&gt;=</CODE></A> , &nbsp;
<A HREF="#greater2"> <CODE>&gt;&gt;</CODE></A> ,&nbsp;
<A HREF="#greater2equal"> <CODE>&gt;&gt;=</CODE></A> , &nbsp;
<A HREF="#query"> <CODE>?</CODE></A> , &nbsp;
<A HREF="#hat"> <CODE>^</CODE></A> , &nbsp;
<A HREF="#hatequal"> <CODE>^=</CODE></A> , &nbsp; 
<A HREF="#at"> <CODE>&#64;</CODE></A> ,&nbsp; 
<A HREF="#acos"> <CODE>acos</CODE></A> ,&nbsp; 
<A HREF="#asin"> <CODE>asin</CODE></A> , &nbsp;
<A HREF="#atan"> <CODE>atan</CODE></A> , &nbsp;
<A HREF="#break"> <CODE>break</CODE></A> , &nbsp;
<A HREF="#backquote"> <CODE>byte</CODE></A> , &nbsp;
<A HREF="#call"> <CODE>call</CODE></A> , &nbsp;
<A HREF="#case"> <CODE>case</CODE></A> , &nbsp;
<A HREF="#class"> <CODE>class</CODE></A> , &nbsp;
<A HREF="#continue"> <CODE>continue</CODE></A> ,&nbsp; 
<A HREF="#cos"> <CODE>cos</CODE></A> ,&nbsp;  
<A HREF="#default"> <CODE>default</CODE></A> ,&nbsp; 
<A HREF="#do"> <CODE>do</CODE></A> ,&nbsp; 
<A HREF="#else"> <CODE>else</CODE></A> ,&nbsp; 
<A HREF="#enum"> <CODE>enum</CODE></A> ,&nbsp; 
<A HREF="#exp"> <CODE>exp</CODE></A> ,&nbsp; 
<A HREF="#fclose"> <CODE>fclose</CODE></A> ,&nbsp;
<A HREF="#floor"> <CODE>floor</CODE></A> ,&nbsp; 
<A HREF="#fopen"> <CODE>fopen</CODE></A> ,&nbsp; 
<A HREF="#for"> <CODE>for</CODE></A> ,&nbsp; 
<A HREF="#gc"> <CODE>gc</CODE></A> ,&nbsp; 
<A HREF="#getarg"> <CODE>getarg</CODE></A> ,&nbsp; 
<A HREF="#getc"> <CODE>getc</CODE></A> ,&nbsp; 
<A HREF="#if"> <CODE>if</CODE></A> ,&nbsp; 
<A HREF="#in"> <CODE>in</CODE></A> ,&nbsp; 
<A HREF="#input"> <CODE>input</CODE></A> ,&nbsp;
<A HREF="#local"> <CODE>local</CODE></A> ,&nbsp; 
<A HREF="#log"> <CODE>log</CODE></A> ,&nbsp; 
<A HREF="#new"> <CODE>new</CODE></A> ,&nbsp; 
<A HREF="#newstring"> <CODE>newstring</CODE></A> ,&nbsp; 
<A HREF="#newvector"> <CODE>newvector</CODE></A> ,&nbsp; 
<A HREF="#nil"> <CODE>nil</CODE></A> ,&nbsp; 
<A HREF="#oscli"> <CODE>oscli</CODE></A> ,&nbsp; 
<A HREF="#pi"> <CODE>pi</CODE></A> ,&nbsp; 
<A HREF="#print"> <CODE>print</CODE></A> ,&nbsp; 
<A HREF="#put"> <CODE>put</CODE></A> ,&nbsp; 
<A HREF="#putc"> <CODE>putc</CODE></A> ,&nbsp;
<A HREF="#backquote2"> <CODE>putbyte</CODE></A> ,&nbsp; 
<A HREF="#pound2"> <CODE>putword</CODE></A> ,&nbsp;  
<A HREF="#quit"> <CODE>quit</CODE></A> ,&nbsp; 
<A HREF="#repeat"> <CODE>repeat</CODE></A> ,&nbsp; 
<A HREF="#rnd"> <CODE>rnd</CODE></A> ,&nbsp; 
<A HREF="#return"> <CODE>return</CODE></A> ,&nbsp; 
<A HREF="#seed"> <CODE>seed</CODE></A> ,&nbsp; 
<A HREF="#sin"> <CODE>sin</CODE></A> ,&nbsp; 
<A HREF="#sizeof"> <CODE>sizeof</CODE></A> ,&nbsp; 
<A HREF="#sqrt"> <CODE>sqrt</CODE></A> ,&nbsp; 
<A HREF="#start_task"> <CODE>start_task</CODE></A> ,&nbsp; 
<A HREF="#static"> <CODE>static</CODE></A> ,&nbsp; 
<A HREF="#stderr"> <CODE>stderr</CODE></A> ,&nbsp; 
<A HREF="#stdin"> <CODE>stdin</CODE></A> ,&nbsp; 
<A HREF="#stdout"> <CODE>stdout</CODE></A> ,&nbsp; 
<A HREF="#swi"> <CODE>swi</CODE></A> ,&nbsp; 
<A HREF="#switch"> <CODE>switch</CODE></A> ,&nbsp; 
<A HREF="#sysvar"> <CODE>sysvar</CODE></A> ,&nbsp; 
<A HREF="#tan"> <CODE>tan</CODE></A> ,&nbsp;
<A HREF="#this"> <CODE>this</CODE></A> ,&nbsp; 
<A HREF="#time"> <CODE>time</CODE></A> ,&nbsp; 
<A HREF="#typeof"> <CODE>typeof</CODE></A> ,&nbsp; 
<A HREF="#until"> <CODE>until</CODE></A> ,&nbsp; 
<A HREF="#val"> <CODE>val</CODE></A> ,&nbsp; 
<A HREF="#vector"> <CODE>vector</CODE></A> ,&nbsp; 
<A HREF="#wimp_closedown"> <CODE>wimp_closedown</CODE></A> ,&nbsp; 
<A HREF="#wimp_init"> <CODE>wimp_init</CODE></A> ,&nbsp; 
<A HREF="#wimp_report"> <CODE>wimp_report</CODE></A> ,&nbsp; 
<A HREF="#while"> <CODE>while</CODE></A> ,&nbsp;
<A HREF="#or"> <CODE>|</CODE></A> ,&nbsp; 
<A HREF="#orequal"> <CODE>|=</CODE></A> ,&nbsp;
<A HREF="#or2"> <CODE>||</CODE></A> ,&nbsp;
<A HREF="#or2equal"> <CODE>||=</CODE></A> ,&nbsp;
<A HREF="#tilde"> <CODE>~</CODE></A> ,&nbsp;  
<A HREF="#pound"> <CODE>word</CODE></A>. 
<P>
<HR>
<P>
<DL>

<DT><A NAME="pling"><CODE>&#33;</CODE></A>
<DD><CODE>&#33;x</CODE> Returns 0 if <CODE>x</CODE>
   is nonzero and 1 otherwise. <CODE>x</CODE> must be
   an integer.

<DD>&nbsp;<DT><A NAME="notequal"><CODE>!=</CODE></A>
<DD><CODE>x != y</CODE> Both <CODE>x, y</CODE> must be
      integers, strings or reals. It returns 1 if they are 
      different and 0 if they are equal.

<DD>&nbsp;<DT><A NAME="dollar"><CODE>&#36;</CODE></A>
<DD><CODE>&#36;(x)</CODE> is the string stored at address
    <CODE>x </CODE>. The string is terminated by any character 
    with ASCII code less than 32. The address <CODE>x</CODE>
    should be an integer divisible by 4.

<DD>&nbsp;<DT><A NAME="dollar2"><CODE>&#36;&#36;</CODE></A>
<DD><CODE>&#36;&#36;(x,s)</CODE> returns the value of the string
    <CODE>s</CODE> and places <CODE>s</CODE> at address
    <CODE>x</CODE>.
<DD>E.g. <CODE>&#36;&#36;(x,&#36;&#36;(y,s));</CODE>
    stores <CODE>s</CODE> at both <CODE>x</CODE> and <CODE>y</CODE>.

<DD>&nbsp;<DT><A NAME="percent"><CODE>&#37;</CODE></A>
<DD><CODE>x &#37; y</CODE> is remainder for dividing the
integer <CODE>x</CODE> by the integer <CODE>y</CODE>.

<DD>&nbsp;<DT><A NAME="percentequal"><CODE>&#37;=</CODE></A>
<DD><CODE>x &#37;= y</CODE> Assign <CODE>x%y</CODE> to
     <CODE>x</CODE>, and then return <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="and"><CODE>&#38;</CODE></A>
<DD><CODE>x &#38; y</CODE> returns the bitwise AND of
    <CODE>x</CODE> and <CODE>y</CODE>. Both <CODE>x,y</CODE>
    must be integers.

<DD>&nbsp;<DT><A NAME="and2"><CODE>&#38;&#38;</CODE></A>
<DD><CODE>x &#38;&#38; y</CODE> If <CODE>x</CODE> is
   zero the expression returns 0 without evaluating 
   <CODE>y</CODE>. Otherwise it returns 0 if
   <CODE>y</CODE> is zero and 1 otherwise.  Both
   <CODE>x,y</CODE> must be integers.

<DD>&nbsp;<DT><A NAME="andequal"><CODE>&#38;=</CODE></A>
<DD><CODE>x &#38;= y</CODE> Assign <CODE>x&#38;y</CODE>
    to <CODE>x</CODE> and then return <CODE>x</CODE>. Both
   <CODE>x,y</CODE> must be integers.

<DD>&nbsp;<DT><A NAME="and2equal"><CODE>&#38;&#38;=</CODE></A>
<DD><CODE>x &#38;&#38;= y</CODE> Assign <CODE>x&#38;&#38;y</CODE>
    to <CODE>x</CODE> and then return <CODE>x</CODE>. Both
   <CODE>x,y</CODE> must be integers.

<DD>&nbsp;<DT><A NAME="times"><CODE>*</CODE></A>
<DD><CODE>x * y</CODE> The values <CODE>x, y</CODE>
      are reals or integers. Their product is returned.
      The type of the result is real if either 
      <CODE>x</CODE> or <CODE>y</CODE> is a real
      and integer otherwise.

<DD>&nbsp;<DT><A NAME="timesequal"><CODE>*=</CODE></A>
<DD><CODE>x *= y</CODE> Assign <CODE>x*y</CODE>
    to <CODE>x</CODE> and then return <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="plus"><CODE>+</CODE></A>
<DD><CODE>x + y</CODE> If <CODE>x, y</CODE> are both integers
        or both reals it returns their sum. If 
        <CODE>x, y</CODE> are both strings it returns their
        concatenation. If either <CODE>x</CODE> or <CODE>y</CODE>
        is a string and the other argument is an integer, the 
        other argument is converted to the string consisting 
        of the single character given by the ASCII code of 
        the bottom 8 bits and the result is the concatenation 
        of the two strings.

<DD>&nbsp;<DT><A NAME="plus2"><CODE>++</CODE></A>
<DD><CODE>x++</CODE>Evaluate <CODE>x </CODE> in the current
       expression, and then assign <CODE>x+1</CODE> to <CODE>x</CODE>.
<DD><CODE>++x</CODE> Assign <CODE>x+1</CODE> to <CODE>x</CODE>
       before further evaluation.

<DD>&nbsp;<DT><A NAME="plusequal"><CODE>+=</CODE></A>
<DD><CODE>x += y</CODE>  Assign <CODE>x+y</CODE> to
      <CODE>x</CODE>, and return <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="minus"><CODE>-</CODE></A>
<DD><CODE>x - y</CODE> The values <CODE>x, y</CODE> are
     both integers or both reals. Their difference is returned.

<DD>&nbsp;<DT><A NAME="minus2"><CODE>--</CODE></A>
<DD><CODE>x--</CODE>Evaluate <CODE>x</CODE> in the current
       expression, and then assign <CODE>x-1</CODE> to <CODE>x</CODE>.
<DD><CODE>--x</CODE> Assign <CODE>x-1</CODE> to <CODE>x</CODE>
       before further evaluation.

<DD>&nbsp;<DT><A NAME="minusequal"><CODE>-=</CODE></A>
<DD><CODE>x -= y</CODE>  Assign <CODE>x-y</CODE> to
      <CODE>x</CODE>, and return <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="divide"></A><CODE>/</CODE></A>
<DD></A><CODE>x / y</CODE></A> If <CODE>x</CODE> is an
      integer, then so must <CODE>y</CODE> be and an integer
      and their quotient is returned. If <CODE>x</CODE> is real
      <CODE>y</CODE> may be either an integer or a real and
      the real quotient is returned.

<DD>&nbsp;<DT><A NAME="divideequal"><CODE>/=</CODE></A>
<DD><CODE>x /= y</CODE>  Assign <CODE>x/y</CODE> to
      <CODE>x</CODE>, and return <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="arrow"><CODE>-&gt;</CODE></A>
<DD><CODE>myinstance-&gt;mymethod</CODE> is the function obtained
when method <CODE>mymethod</CODE> is instantiated for the instance
<CODE>myinstance</CODE>.
<DD> E.g. <CODE>print(&quot;The x-coordinate of vertex is &quot;,
                vertex-&gt;x(),&quot;\n&quot);</CODE>
<DD>Each instance object of a class has its own private copy
    of the class's data, which can only be updated or accessed
    using a  method.

<DD>&nbsp;<DT><A NAME="colon"><CODE>:</CODE></A>
<DD><CODE>c?yes:no</CODE> see <A HREF="#query"> ?</A>

<DD><CODE>class child:parent { ... }</CODE> declares
    <CODE>child</CODE> as a subclass of <CODE>parent</CODE>.
    Instance objects of <CODE>child</CODE> have access to the
    methods of <CODE>parent</CODE>.

<DD>&nbsp;<DT><A NAME="colon2"><CODE>::</CODE></A>
<DD><CODE>myclass::mymethod()</CODE> declares
    <CODE>mymethod()</CODE> to be a method for the
    <A HREF="#class">class </A> <CODE>myclass</CODE>. 

<DD>&nbsp;<DT><A NAME="lessthan"><CODE>&lt;</CODE></A>
<DD><CODE>x &lt; y</CODE> The values <CODE>x, y</CODE> are
       both integers, strings or reals. It returns 1
       if <CODE>x</CODE> strictly precedes <CODE>y</CODE>,
       otherwise it returns 0.

<DD>&nbsp;<DT><A NAME="lessthan2"><CODE>&lt;&lt;</CODE></A>
<DD><CODE>x &lt;&lt; y</CODE> If <CODE>x, y</CODE> are
        both integers it returns <CODE>x </CODE> shifted left by
        <CODE>y</CODE> bits. If <CODE>x</CODE> is an iostream and
        <CODE>y</CODE> a string, it outputs <CODE>y</CODE> to
        <CODE>x</CODE> and returns the result <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="lessthanequal"><CODE>&lt;=</CODE></A>
<DD><CODE>x &lt;= y</CODE> The values <CODE>x, y</CODE> are
       both integers, strings or reals. It returns 1
       if <CODE>x</CODE> precedes or equals <CODE>y</CODE>,
       otherwise it returns 0.

<DD>&nbsp;<DT><A NAME="lessthan2equal"><CODE>&lt;&lt;=</CODE></A>
<DD><CODE>x &lt;&lt;= y</CODE>  Assign <CODE>x&lt;&lt;y</CODE> to
      <CODE>x</CODE>, and return <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="assign"><CODE>=</CODE></A>
<DD><CODE>x = y</CODE> Assign <CODE>y</CODE> to
    <CODE>x</CODE> and return that value.

<DD>&nbsp;<DT><A NAME="equal"><CODE>==</CODE></A>
<DD><CODE>x == y</CODE> The values <CODE>x, y</CODE> are
      both integers, strings or reals. It returns 0
      if they are different and 1 if they are equal.

<DD>&nbsp;<DT><A NAME="greater"><CODE>&gt;</CODE></A>
<DD><CODE>x &gt; y</CODE> The values <CODE>x, y</CODE> are
      both integers, strings or reals. It returns 1 if
      if <CODE>y</CODE> strictly precedes <CODE>x</CODE>,
      otherwise it returns 0.

<DD>&nbsp;<DT><A NAME="greaterequal"><CODE>&gt;=</CODE></A>
<DD><CODE>x &gt;= y</CODE> The values <CODE>x, y</CODE> are
      both integers, strings or reals. It returns 1 if
      if <CODE>y</CODE> precedes or equals <CODE>x</CODE>,
      otherwise it returns 0.

<DD>&nbsp;<DT><A NAME="greater2"><CODE>&gt;&gt;</CODE></A>
<DD><CODE>x &gt;&gt; y</CODE> The values <CODE>x, y</CODE> are
       both integers. It returns <CODE>x</CODE> arithmetically shifted
       right by <CODE>y</CODE> bits.

<DD>&nbsp;<DT><A NAME="greater2equal"><CODE>&gt;&gt;=</CODE></A>
<DD><CODE>x &gt;&gt;= y</CODE>  Assign <CODE>x&gt;&gt;y</CODE> to
      <CODE>x</CODE>, and return <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="query"><CODE>?</CODE></A>
<DD><CODE>c?yes:no</CODE> The value <CODE>c</CODE> an integer.
     If it is nonzero, the expression evaluates and returns 
     the value of <CODE>yes</CODE> (<CODE>no</CODE> is
     not evaluated), otherwise it evaluates and returns
     the value of <CODE>no</CODE> (<CODE>yes</CODE> is not evaluated).

<DD>&nbsp;<DT><A NAME="hat"><CODE>^</CODE></A>
<DD><CODE>x ^ y</CODE>  Both <CODE>x, y</CODE> are integers.
    Returns the bitwise XOR of <CODE>x</CODE> and <CODE>y</CODE>.

<DD>&nbsp;<DT><A NAME="hatequal"><CODE>^=</CODE></A>
<DD><CODE>x ^= y</CODE>  Assign <CODE>x^y</CODE> to
      <CODE>x</CODE>, and return <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="or"><CODE>|</CODE></A>
<DD><CODE>x | y</CODE>  Both <CODE>x, y</CODE> are integers.
    Returns the bitwise OR of <CODE>x</CODE> and <CODE>y</CODE>.

<DD>&nbsp;<DT><A NAME="orequal"><CODE>|=</CODE></A>
<DD><CODE>x |= y</CODE>  Assign <CODE>x|y</CODE> to
      <CODE>x</CODE>, and return <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="or2"><CODE>||</CODE></A>
<DD><CODE>x || y</CODE>  Both <CODE>x, y</CODE> are integers.
    If <CODE>x</CODE> is nonzero, the expression 
    evaluates to 1, without evaluating <CODE>y</CODE>. Otherwise 
    it returns 0 if <CODE>y</CODE> is zero and 1 otherwise.

<DD>&nbsp;<DT><A NAME="or2equal"><CODE>||=</CODE></A>
<DD><CODE>x ||= y</CODE>  Assign <CODE>x||y</CODE> to
      <CODE>x</CODE>, and return <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="tilde"><CODE>~</CODE></A>
<DD><CODE>~x</CODE> returns the bitwise NOT of the integer
     <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="at"><CODE>&#64;</CODE></A>
<DD><CODE>&#64;(s)</CODE> is the address of the first character of the
     string <CODE>s</CODE>. This address is divisible by 4. Strings 
     are stored as a consecutive array of bytes.
<DD>E.g. <CODE>&#64;s = &#64;(s = &quot;hello&quot;);</CODE>

<DD>&nbsp;<DT><A NAME="acos"><CODE>acos</CODE></A>
<DD><CODE>acos(x)</CODE> is arc-cos of the real <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="asin"><CODE>asin</CODE></A>
<DD><CODE>asin(x)</CODE> is arc-sine of the real <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="atan"><CODE>atan</CODE></A>
<DD><CODE>atan(x) </CODE> is arc-tangent of the real <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="break"><CODE>break</CODE></A>
<DD><CODE>break; </CODE> Jump out of the current structure.
  It only makes sense within a <CODE>switch</CODE>, <CODE>do</CODE>/
  <CODE>repeat</CODE>, <CODE>for</CODE> or <CODE>while</CODE> structure.
  
<DD>&nbsp;<DT><A NAME="backquote"><CODE>byte</CODE></A>
<DD><CODE>byte(x) </CODE> Returns as an integer the 
      contents of the byte at the address or string 
      <CODE>x</CODE>. If <CODE>s</CODE> is a string
      <CODE>byte(s)</CODE> is the same as <CODE>s[0]</CODE>.

<DD>&nbsp;<DT><A NAME="call"><CODE>call</CODE></A>
<DD><CODE>call(adr,r0); </CODE> Call machine code at the address 
    <CODE>adr</CODE> with register R0 holding the address 
    <CODE>r0</CODE>. The same calling conventions should be used
     as for C. So the code should return with MOV PC,R14 and should 
     preserve registers R10 - R14. The address <CODE>r0</CODE> should 
     be used for a buffer for passing data in and out.

<DD>&nbsp;<DT><A NAME="case"><CODE>case</CODE></A>
<DD><CODE>case x:</CODE> Part of the
  <A HREF="#switch"><CODE>switch</CODE></A> construct.

<DD>&nbsp;<DT><A NAME="class"><CODE>class</CODE></A>
<DD><CODE>class </CODE> Keyword introducing a class definition. 
   Class definitions can only appear at the top level.
   That is to say, they cannot appear inside a
   class definition or a function definition.
   Class definitions must precede the definitions
   of any of their instance objects.
<DD> E.g. <CODE>class point { q; /* a vector of coordinates */ }</CODE>
<DD> We say that the class <CODE>point</CODE> has the vector 
   <CODE>q</CODE> as its <EM>data</EM>.
   <EM>Methods</EM> for a class can be declared inside the class's
   definition but this is optional. They must be defined 
   outside the class definition. For example, to add a method 
   to <CODE>point</CODE> to read its first coordinate, we could have
<DD> <CODE>point::x() { return q[0]; }</CODE>
<DD> Method definitions are exactly like function definitions 
     except that the class name, followed by <CODE>::</CODE>,
     prefixes the method name. The same method name can be
     used in different classes. That is to say, data and
     method names are local to a class. The variable
     <A HREF="#this"><CODE>this</CODE></A> can be used in a method to 
     refer to the instance object using the method.

<DD>&nbsp;<DT><A NAME="continue"><CODE>continue</CODE></A>
<DD><CODE>continue; </CODE> Start the next iteration of the smallest 
     enclosing <CODE>do</CODE>/<CODE>repeat, for</CODE> or
     <CODE>while</CODE> structure. 

<DD>&nbsp;<DT><A NAME="cos"><CODE>cos</CODE></A>
<DD><CODE>cos(x)</CODE> is cosine of the real <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="default"><CODE>default</CODE></A>
<DD><CODE>default:</CODE> the default alternative in the
   <A HREF="#switch"><CODE>switch</CODE></A> structure.

<DD>&nbsp;<DT><A NAME="do"><CODE>do</CODE></A>
<DD><CODE>do ... until/while (x);</CODE> Looping construct where the body is executed at least once.

<DD>&nbsp;<DT><A NAME="else"><CODE>else</CODE></A>
<DD><CODE>else</CODE> Optional part of
   <A HREF="#if"><CODE>if</CODE></A> construct.

<DD>&nbsp;<DT><A NAME="enum"><CODE>enum</CODE></A>
<DD><CODE>enum { x1, ... , xn } </CODE> This returns the integer
     <CODE>n</CODE> and assigns the values 0, 1, ... (n-1) to the n
     variables <CODE> x1, ... xn </CODE> in order. It is useful for
     hiding explicit indexing.

<DD>&nbsp;<DT><A NAME="exp"><CODE>exp</CODE></A>
<DD><CODE>exp(x)</CODE> is exponential of the real <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="fclose"><CODE>fclose</CODE></A>
<DD><CODE>fclose(fp);</CODE> closes the iostream <CODE>fp</CODE>
           and returns <CODE>nil</CODE>.

<DD>&nbsp;<DT><A NAME="floor"><CODE>floor</CODE></A>
<DD><CODE>floor(x)</CODE> is the integer part of the real
    value <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="fopen"><CODE>fopen</CODE></A>
<DD><CODE>fopen(fname,mode) </CODE> tries to open a new iostream
     connected to the file named by the string <CODE>fname</CODE>. 
     If unsuccessful, returns <CODE>nil</CODE>, and otherwise returns
     the iostream itself. The mode variable can take the values 
     &quot;r&quot; (read), &quot;w&quot; (write) and 
     &quot;a&quot; (append).

<DD>&nbsp;<DT><A NAME="for"><CODE>for</CODE></A>
<DD><CODE>for(start;terminate;action) .... </CODE> iteration construct.
<DD> E.g. <PRE>
        for(i = 0; i &lt; sizeof(v); i++)
           print(&quot;v[&quot;,i,&quot;] = &quot;,v[i],&quot;\n&quot);
     </PRE>

<DD>&nbsp;<DT><A NAME="gc"><CODE>gc</CODE></A>
<DD><CODE>gc(); </CODE> forces garbage collection. The value
    <CODE>nil</CODE> is returned.

<DD>&nbsp;<DT><A NAME="getarg"><CODE>getarg</CODE></A>
<DD><CODE>getarg(i)</CODE> returns the <CODE>i</CODE>-th
     argument on the command line as a string, if there is one, and
     <CODE>nil</CODE> if there is none. The 0-th argument is the command
     itself (the program's pathname).
<DD> E.g. <PRE>
           for(i = 1; typeof(arg = getarg(i)); i++)
               process(arg);</PRE>

<DD>&nbsp;<DT><A NAME="getc"><CODE>getc</CODE></A>
<DD><CODE>getc(fp) </CODE> returns either the next byte from the 
   iostream <CODE>fp</CODE> or <CODE>EOF</CODE>.

<DD>&nbsp;<DT><A NAME="if"><CODE>if</CODE></A>
<DD><CODE>if (condition) ... else ... </CODE>  conditional construct.
   A condition is regarded as false if it is either the integer 0
   or the value <CODE>nil</CODE>. Other values count as true. 

<DD>&nbsp;<DT><A NAME="in"><CODE>in</CODE></A>
<DD><CODE>in buffer put { x1; .... xn ;}</CODE> structure.
   <CODE>buffer</CODE> is either a string or an integer address.
   The values <CODE>x1 ... xn</CODE> are strings or integers.

<DD>&nbsp;<DT><A NAME="input"><CODE>input</CODE></A>
<DD><CODE>input() </CODE> Returns an input string. Leading spaces are
      not removed. To input a number use the function 
      <A HREF="#val"><CODE>val</CODE></A>.
<DD>E.g. <CODE>n = val(input());</CODE>

<DD>&nbsp;<DT><A NAME="local"><CODE>local</CODE></A>
<DD><CODE>local x1, ... xn ;</CODE> declares <CODE>x1, ... ,xn</CODE>
  to be local variables. This statement must precede all others in
  the body of a function or method definition.

<DD>&nbsp;<DT><A NAME="log"><CODE>log</CODE></A>
<DD><CODE>log(x)</CODE> is natural logarithm of the real <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="new"><CODE>new</CODE></A>
<DD><CODE>new </CODE> is used to create instance objects of classes.
<DD> E.g. for a class foo <CODE>x = new foo( ... );</CODE>

<DD>&nbsp;<DT><A NAME="newstring"><CODE>newstring</CODE></A>
<DD><CODE>newstring(n) </CODE> Allocates an array of 
     <CODE>n</CODE> bytes in the heap, starting on a 
     word boundary, initializes them to zero, and returns 
     the string which has this array as its value.

<DD>&nbsp;<DT><A NAME="newvector"><CODE>newvector</CODE></A>
<DD><CODE>newvector(n)</CODE> Allocates space in the heap
     for an <CODE>n</CODE>-component vector, whose values 
     are all <CODE>nil</CODE>, and returns this vector.
<DD>E.g.<PRE>
     loopy = newvector(2);
     loopy[0] = loopy; </PRE>

<DD>&nbsp;<DT><A NAME="nil"><CODE>nil</CODE></A>
<DD><CODE>nil</CODE> the single value of type NIL. This is
    used to represent undefined quantities.

<DD>&nbsp;<DT><A NAME="oscli"><CODE>oscli</CODE></A>
<DD><CODE>oscli(s)</CODE> Sends a string s to the command line
      interpreter. The value <CODE>nil</CODE> is returned.

<DD>&nbsp;<DT><A NAME="pi"><CODE>pi</CODE></A>
<DD><CODE>pi</CODE> is an approximation to the ratio of the
    circumference of a circle to its diameter.

<DD>&nbsp;<DT><A NAME="print"><CODE>print</CODE></A>
<DD><CODE>print(x1, ... ,xn); </CODE> Print the items 
       <CODE>x1, .... xn</CODE> and return
       <CODE>nil</CODE>. Newlines are not automatically 
       appended. The digrams <CODE>\n, \t, \\</CODE> can be used 
       in strings for newline, tab and \, respectively.
       <CODE>print</CODE> should not be used in a wimp program.

<DD>&nbsp;<DT><A NAME="put"><CODE>put</CODE></A>
<DD><CODE>in buffer put {x1; .... xn; }</CODE> See
    <A HREF="#in"><CODE>in</CODE></A>.
    
<DD>&nbsp;<DT><A NAME="backquote2"><CODE>putbyte</CODE></A>
<DD><CODE>putbyte(x,c) </CODE> Place byte <CODE>c</CODE>
       at address <CODE>x</CODE>, and return <CODE>c</CODE>.


<DD>&nbsp;<DT><A NAME="putc"><CODE>putc</CODE></A>
<DD><CODE>putc(ch,fp);</CODE> Writes the character ch to the
    iostream <CODE>fp</CODE>. Returns <CODE>nil</CODE>.
    
<DD>&nbsp;<DT><A NAME="pound2"><CODE>putword</CODE></A>
<DD><CODE>putword(x,n)</CODE> Place integer <CODE>n</CODE>
       at address <CODE>x</CODE>, and return <CODE>n</CODE>.

<DD>&nbsp;<DT><A NAME="quit"><CODE>quit</CODE></A>
<DD><CODE>quit(s); </CODE> Causes the program to exit with a message
       <CODE>s</CODE> to <CODE>stderr</CODE> and returns
       <CODE>nil</CODE>. In wimp programs 
       <CODE>wimp_closedown</CODE> is called.

<DD>&nbsp;<DT><A NAME="repeat"><CODE>repeat</CODE></A>
<DD><CODE>repeat</CODE> is a synonym for
   <A HREF="#do"><CODE>do</CODE></A>.

<DD>&nbsp;<DT><A NAME="rnd"><CODE>rnd</CODE></A>
<DD><CODE>rnd()</CODE> returns a random positive integer.

<DD>&nbsp;<DT><A NAME="return"><CODE>return</CODE></A>
<DD><CODE>return x;</CODE> returns <CODE>x</CODE> as the
       value of a function or method. <CODE>return;</CODE>
       is equivalent to <CODE>return nil;</CODE>.

<DD>&nbsp;<DT><A NAME="seed"><CODE>seed</CODE></A>
<DD><CODE>seed(n) ;</CODE> Seeds the random number generator 
     with the integer <CODE>n</CODE> and returns
     <CODE>nil</CODE>.

<DD>&nbsp;<DT><A NAME="sin"><CODE>sin</CODE></A>
<DD><CODE>sin(x)</CODE> is sine of the real <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="sizeof"><CODE>sizeof</CODE></A>
<DD><CODE>sizeof(s)</CODE> returns the number of characters in a string
     <CODE>s</CODE>, or the number of components of a vector
     <CODE>s</CODE>, as an integer.

<DD>&nbsp;<DT><A NAME="sqrt"><CODE>sqrt</CODE></A>
<DD><CODE>sqrt(x)</CODE> is square-root of the real <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="start_task"><CODE>start_task</CODE></A>
<DD><CODE>start_task(s)</CODE> takes a command in the string
      <CODE>s </CODE> to start up a child task, and returns its task
      handle. This works from within a taskwindow or a
      a command window.
      This function should only be used outside wimp programs 
      (i.e. before <A HREF="#wimp_init"><CODE>wimp_init</CODE></A>
      or after <A HREF="#wimp_closedown"><CODE>wimp_closedown</CODE></A>.
      There are other means of starting a child task from within a wimp 
      program.

<DD>&nbsp;<DT><A NAME="static"><CODE>static</CODE></A>
<DD><CODE>static</CODE> prefix for the declaration of
    static data and methods in a class definition. Such 
    data and methods are shared by all instances of a 
    class. Static methods may not use the variable 
    <A HREF="#this"><CODE>this</CODE></A>.  A typical
    use of static variables would be a variable to count 
    the number of instance objects of a certain kind.
<DD> E.g.<PRE>
    class foo
    {
     static total;
     ..........  
    }

    foo::foo(...)
    {
     if (typeof(total)) total += 1;
     else total = 1;
     ...............
    }

    foo::current_number()
    { return total; }
    </PRE>
    

<DD>&nbsp;<DT><A NAME="stderr"><CODE>stderr</CODE></A>
<DD><CODE>stderr</CODE> is a built-in iostream.

<DD>&nbsp;<DT><A NAME="stdin"><CODE>stdin</CODE></A>
<DD><CODE>stdin</CODE> is a built-in iostream.

<DD>&nbsp;<DT><A NAME="stdout"><CODE>stdout</CODE></A>
<DD><CODE>stdout</CODE> is a built-in iostream.

<DD>&nbsp;<DT><A NAME="swi"><CODE>swi</CODE></A>
<DD><CODE>swi(x,r)</CODE> calls SWI <CODE>x</CODE>, given
    either as a string or number, with registers R0-R7 preloaded
    with the first 8 components of the vector <CODE>r</CODE>,
    and returns <CODE>nil</CODE> with the components of
    <CODE>r</CODE> updated to the returned values in registers
    R0-R7. Note that even though a SWI may pass no values in 
    registers, it is necessary for the second argument to be a vector 
    with at least 8 components.
<DD>E.g.<PRE>
    event_process(maskptr,buffer,action,user)
    {
     local r, respond, go_on;
     r = newvector(8);
     go_on = TRUE;
     while(go_on)
     {
      r[0] = maskptr[0];
      r[1] = buffer;
      swi("Wimp_Poll",r);
      go_on =
        (typeof(respond = action[r[0]])
           == BYTECODE)?respond(buffer,user,maskptr):TRUE;
     }
     wimp_closedown();
    }      </PRE>


<DD>&nbsp;<DT><A NAME="switch"><CODE>switch</CODE></A>
<DD><CODE>switch (c) { .... } </CODE> is the multibranch 
      conditional structure.

<DD>&nbsp;<DT><A NAME="sysvar"><CODE>sysvar</CODE></A>
<DD><CODE>sysvar(s)</CODE>  Returns the string value of the
      string system variable <CODE>s</CODE> or <CODE>nil</CODE>
      if the variable is unset.
<DD> E.g. <CODE>print(sysvar(&quot;Bob$Path&quot;),&quot;\n&quot;);</CODE>

<DD>&nbsp;<DT><A NAME="tan"><CODE>tan</CODE></A>
<DD><CODE>tan(x)</CODE> is tangent of the real <CODE>x</CODE>.

<DD>&nbsp;<DT><A NAME="this"><CODE>this</CODE></A>
<DD><CODE>this</CODE> is a variable that can be used in a method
  to refer to the instance object using the method.
<DD>E.g.<PRE>
     foo::methodA( .. )
     {
       .... this-&gt;methodB(...) ...
     } </PRE>

<DD>&nbsp;<DT><A NAME="time"><CODE>time</CODE></A>
<DD><CODE>time()</CODE> Returns the first 32 bits of the time in
           centiseconds since the beginning of the century.

<DD>&nbsp;<DT><A NAME="typeof"><CODE>typeof</CODE></A>
<DD><CODE>typeof(x)</CODE> returns the integer code
    describing the type of <CODE>x</CODE>. The type of <CODE>nil</CODE>
    is 0, and all other values return a nonzero value. 
    This is useful for coping with undefined vector components.
<DD> E.g. <CODE> a = typeof(a)?a:0;</CODE>

<DD>&nbsp;<DT><A NAME="until"><CODE>until</CODE></A>
<DD><CODE>until c</CODE> terminating condition for
    <CODE>do/repeat</CODE> structure.

<DD>&nbsp;<DT><A NAME="val"><CODE>val</CODE></A>
<DD><CODE>val(s)</CODE> Converts as many characters of the
      string <CODE>s</CODE> to a number as it can. Decimal
      or hexadecimal numbers (prefixed by &amp;) are recognized. 
      Note that the hexadecimal digits <CODE>a,b,c,d,e,f</CODE>
      are in lower case. Reals are distinguished by a decimal 
      point.

<DD>&nbsp;<DT><A NAME="vector"><CODE>vector</CODE></A>
<DD><CODE>vector {expr1; ... exprn; }</CODE> returns a new vector
    with components <CODE>expr1 ... exprn</CODE>.
    There must be at least one component.

<DD>&nbsp;<DT><A NAME="wimp_closedown"><CODE>wimp_closedown</CODE></A>
<DD><CODE>wimp_closedown()</CODE> Programs running as wimp
             tasks must use this function before terminating. 
             It returns <CODE>nil</CODE>.

<DD>&nbsp;<DT><A NAME="wimp_init"><CODE>wimp_init</CODE></A>
<DD><CODE>wimp_init(version,name,mesg_list)</CODE> registers
    a task with the window manager. <CODE>version</CODE> is
    100 times the version number of RISC OS being used,
    <CODE>name</CODE> is the name of the wimp task, and
    <CODE>mesg_list</CODE> is a buffer, given as a string
    or its integer address, containing the messages, stored 
    as words and terminated by 0, which the task wishes to 
    receive. The function returns the task handle as an 
    integer.

<DD>&nbsp;<DT><A NAME="wimp_report"><CODE>wimp_report</CODE></A>
<DD><CODE>wimp_report(s)</CODE>  displays string
     <CODE>s</CODE> in a dialogue box and returns 0 if
     no key or mouse button is clicked, 1 if the OK 
     button is selected, and 2 if the CANCEL button is selected.

<DD>&nbsp;<DT><A NAME="while"><CODE>while</CODE></A>
<DD><CODE>while c</CODE> terminating condition for
    <CODE>do/repeat</CODE> structure.


<DD>&nbsp;<DT><A NAME="pound"><CODE>word</CODE></A>
<DD><CODE>word(x)</CODE> Returns as an integer the
      contents of the word at the address or string 
      <CODE>x</CODE>.


</DL>
<HR>
<A HREF="index.html">Back to the index</A>
</BODY>
</HTML>

